package com.dsx.myblog;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import java.io.*;

public class Member implements ApplicationContextAware {
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
    }


    public void f() {
        System.out.println(super.getClass().getName());
    }

    public static void main(String[] args) throws FileNotFoundException {

        String article="草原下面马儿跑,我们的祖国是草原. 草原的花朵真鲜艳.";
        System.out.println(article);
        article=article.replace('.','。');
        System.out.println(article);

        article=article.replace("草原","花园");
        System.out.println(article);

        article=article.replaceFirst("花园","草原");
        System.out.println(article);



        String portFilter = "start_port in ('上海'  ,'天津'  ,'大连'  )  and end_port in ('上海'  ,'天津'  ,'大连'  ) ";
        portFilter.replace("start_port", "p.start_port");
        portFilter.replace("end_port", "p.end_port");
        portFilter.replace('s', 'H');
        System.out.println(portFilter);

    }
}
